<nz-select
  style="width: 100%;"
  [nzDisabled]="disabled"
  [nzLoading]="isLoading"
  [ngModel]="value"
  (ngModelChange)="modelChange($event)"
  [nzMaxTagCount]="maxTagCount"
  [nzPlaceHolder]="placeholder"
  [nzShowSearch]="true"
  [compareWith]="compareFn"
  [nzServerSearch]="true"
  [nzMode]="mode"
  (nzOnSearch)="onSearch($event)"
  [nzAllowClear]='allowClear'>
  <nz-option
    *ngFor="let o of options$ | async"
    nzCustomContent
    [nzValue]="type === 'obj' ? o : o.code"
    [nzLabel]="o.code">
    <span>{{o.code}} <small>{{o.name}}</small></span>
  </nz-option>

  <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
    <i nz-icon type="loading" class="loading-icon"></i> Loading Data...
  </nz-option>
</nz-select>
